package com.ljs.springbootinit.config;
import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Redisson限流 配置
 */
@Configuration
public class RedissonConfig {
    @Bean
    public RedissonClient redissonClient() {
            Config config = new Config();
            config.useSingleServer()
                    .setAddress("redis://192.168.2.70:6379"); // 使用 host 和 port
        return Redisson.create(config);
        }


}
